using System;
using System.Data;
using System.Collections.Generic;

namespace SERP.DAO{
	/********************************BEGIN SalaryDataDetailsDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:09/03/2013 19:09:04</para>
	/// <para>Class Name: SalaryDataDetailsDAO</para>
	/// <para>Description: Class access to table SalaryDataDetails in database. Coder should'nt code here.</para>
	///</summary>

	
	public partial class SalaryDataDetailsDAO : DAOBase<SalaryDataDetailsEntity>{


		#region Select functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateSelectOneCommand</para>
		/// <para>Input: SalaryDataDetailId</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectOneCommand(int SalaryDataDetailId){
			string strSQL="SELECT  [SalaryDataDetailId],[SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId] FROM [SalaryDataDetails]  WHERE [SalaryDataDetails].[SalaryDataDetailId]=@SalaryDataDetailId";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SalaryDataDetailId",SalaryDataDetailId);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SelectOne</para>
		/// <para>Input: SalaryDataDetailId</para>
		/// <para>Output: SalaryDataDetailsEntity</para>
		///</summary>
		public SalaryDataDetailsEntity SelectOne(int SalaryDataDetailId){
			IDbCommand cmd=this.CreateSelectOneCommand(SalaryDataDetailId);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateSelectAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllCommand(){
			string strSQL="SELECT  [SalaryDataDetailId],[SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId] FROM [SalaryDataDetails] ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateSelectAllByKeyCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyCommand(string ColumnName,object Value){
			string strSQL="SELECT  [SalaryDataDetailId],[SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId] FROM [SalaryDataDetails]  WHERE [SalaryDataDetails].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of SalaryDataDetailsEntity</para>
		///</summary>
		public List<SalaryDataDetailsEntity> SelectAll(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SelectAllDS</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDS(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateSelectAllFilterCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllFilterCommand(string strFilter){
			string strSQL="SELECT  [SalaryDataDetailId],[SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId] FROM [SalaryDataDetails]  WHERE "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateSelectAllByKeyFilterCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyFilterCommand(string strFilter,string ColumnName,object Value){
			string strSQL="SELECT  [SalaryDataDetailId],[SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId] FROM [SalaryDataDetails]  WHERE [SalaryDataDetails].["+ColumnName+"]=@ColumnName AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of SalaryDataDetailsEntity</para>
		///</summary>
		public List<SalaryDataDetailsEntity> SelectAllFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SelectAllDSFilter</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectDS(cmd);
		}
		#endregion

		#region Insert functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateInsertCommand</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateInsertCommand(SalaryDataDetailsEntity o){
			string strSQL="INSERT INTO [SalaryDataDetails]([SalaryFieldId],[DateInput],[Note],[SalaryData],[UserId],[PersonId]) VALUES  (@SalaryFieldId,@DateInput,@Note,@SalaryData,@UserId,@PersonId);SELECT  @@IDENTITY";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSalaryFieldId)
				this.CreateCommandParameter(cmd,"@SalaryFieldId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryFieldId",o.SalaryFieldId);

			if(o.IsNullDateInput)
				this.CreateCommandParameter(cmd,"@DateInput",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DateInput",o.DateInput);

			if(o.IsNullNote)
				this.CreateCommandParameter(cmd,"@Note",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Note",o.Note);

			if(o.IsNullSalaryData)
				this.CreateCommandParameter(cmd,"@SalaryData",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryData",o.SalaryData);

			if(o.IsNullUserId)
				this.CreateCommandParameter(cmd,"@UserId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@UserId",o.UserId);

			if(o.IsNullPersonId)
				this.CreateCommandParameter(cmd,"@PersonId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@PersonId",o.PersonId);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: Save</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Save(SalaryDataDetailsEntity o){
			bool result=false;
			IDbCommand cmd=this.CreateInsertCommand(o);
			object id=this.ExecuteScalar(cmd,ref result);
			cmd.Dispose();
			try{
				o.SalaryDataDetailId=int.Parse(Convert.ToString(id));
			}
			catch{}
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: SaveList</para>
		/// <para>Input: List of SalaryDataDetailsEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void SaveList(List<SalaryDataDetailsEntity>list){
			foreach(SalaryDataDetailsEntity o in list){
				try{
					this.Save(o);
				}
				catch{
				}
			}
		}
		#endregion

		#region Update functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateUpdateCommand</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: </para>
		///</summary>
		protected IDbCommand CreateUpdateCommand(SalaryDataDetailsEntity o){
			string strSQL="UPDATE  [SalaryDataDetails] SET [SalaryDataDetails].[SalaryFieldId]=@SalaryFieldId,[SalaryDataDetails].[DateInput]=@DateInput,[SalaryDataDetails].[Note]=@Note,[SalaryDataDetails].[SalaryData]=@SalaryData,[SalaryDataDetails].[UserId]=@UserId,[SalaryDataDetails].[PersonId]=@PersonId WHERE [SalaryDataDetails].[SalaryDataDetailId]=@SalaryDataDetailId";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSalaryFieldId)
				this.CreateCommandParameter(cmd,"@SalaryFieldId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryFieldId",o.SalaryFieldId);

			if(o.IsNullDateInput)
				this.CreateCommandParameter(cmd,"@DateInput",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DateInput",o.DateInput);

			if(o.IsNullNote)
				this.CreateCommandParameter(cmd,"@Note",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Note",o.Note);

			if(o.IsNullSalaryData)
				this.CreateCommandParameter(cmd,"@SalaryData",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryData",o.SalaryData);

			if(o.IsNullUserId)
				this.CreateCommandParameter(cmd,"@UserId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@UserId",o.UserId);

			if(o.IsNullPersonId)
				this.CreateCommandParameter(cmd,"@PersonId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@PersonId",o.PersonId);

			if(o.IsNullSalaryDataDetailId)
				this.CreateCommandParameter(cmd,"@SalaryDataDetailId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryDataDetailId",o.SalaryDataDetailId);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateUpdateFieldCommand</para>
		/// <para>Input: ColumnName,ColumnValue,SalaryDataDetailId</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateUpdateFieldCommand(string ColumnName,object Value,int SalaryDataDetailId){
			string strSQL="UPDATE  [SalaryDataDetails] SET [SalaryDataDetails].["+ColumnName+"]=@ColumnName WHERE [SalaryDataDetails].[SalaryDataDetailId]=@SalaryDataDetailId";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SalaryDataDetailId",SalaryDataDetailId);



			this.CreateCommandParameter(cmd,"@ColumnName",Value);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: Update</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Update(SalaryDataDetailsEntity o){
			IDbCommand cmd=this.CreateUpdateCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateList</para>
		/// <para>Input: List of SalaryDataDetailsEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void UpdateList(List<SalaryDataDetailsEntity>list){
			foreach(SalaryDataDetailsEntity o in list){
				try{
					this.Update(o);
				}
				catch{
				}
			}
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateSalaryFieldId</para>
		/// <para>Input: NewSalaryFieldId,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSalaryFieldId(int NewSalaryFieldId,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SalaryFieldId",NewSalaryFieldId,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateDateInput</para>
		/// <para>Input: NewDateInput,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDateInput(DateTime NewDateInput,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DateInput",NewDateInput,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateNote</para>
		/// <para>Input: NewNote,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNote(string NewNote,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("Note",NewNote,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateSalaryData</para>
		/// <para>Input: NewSalaryData,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSalaryData(Decimal NewSalaryData,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SalaryData",NewSalaryData,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdateUserId</para>
		/// <para>Input: NewUserId,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateUserId(int NewUserId,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("UserId",NewUserId,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: UpdatePersonId</para>
		/// <para>Input: NewPersonId,SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdatePersonId(int NewPersonId,int SalaryDataDetailId){
			IDbCommand cmd=this.CreateUpdateFieldCommand("PersonId",NewPersonId,SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Delete functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: DeleteAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteAllCommand(){
			string strSQL="DELETE   FROM [SalaryDataDetails]  ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: DeleteCommand</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteCommand(SalaryDataDetailsEntity o){
			string strSQL="DELETE   FROM [SalaryDataDetails]   WHERE [SalaryDataDetails].[SalaryDataDetailId]=@SalaryDataDetailId";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSalaryDataDetailId)
				this.CreateCommandParameter(cmd,"@SalaryDataDetailId",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SalaryDataDetailId",o.SalaryDataDetailId);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: DeleteAll</para>
		/// <para>Input: </para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteAll(){
			IDbCommand cmd=this.CreateDeleteAllCommand();
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateDeleteByPrimaryKeyCommand</para>
		/// <para>Input: SalaryDataDetailId</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByPrimaryKeyCommand(int SalaryDataDetailId){
			string strSQL="DELETE   FROM [SalaryDataDetails]   WHERE [SalaryDataDetails].[SalaryDataDetailId]=@SalaryDataDetailId";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SalaryDataDetailId",SalaryDataDetailId);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: CreateDeleteByKeyCommand</para>
		/// <para>Input: ColumnName , ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByKeyCommand(string ColumnName,object Value){
			string strSQL="DELETE   FROM [SalaryDataDetails]   WHERE [SalaryDataDetails].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: Delete</para>
		/// <para>Input: SalaryDataDetailsEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Delete(SalaryDataDetailsEntity o){
			IDbCommand cmd=this.CreateDeleteCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: DeleteByID</para>
		/// <para>Input: SalaryDataDetailId</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByID(int SalaryDataDetailId){
			IDbCommand cmd=this.CreateDeleteByPrimaryKeyCommand(SalaryDataDetailId);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select join to People functions
		#endregion

		#region Select,delete by SalaryDataDetailId functions
		#endregion

		#region Select,delete by PersonId functions
		#endregion

		#region MapObject functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:09/03/2013 19:09:04</para>
		/// <para>Name: MapObject</para>
		/// <para>Input: IDataReader</para>
		/// <para>Output: SalaryDataDetailsEntity</para>
		///</summary>
		protected override SalaryDataDetailsEntity MapObject(IDataReader r){
			SalaryDataDetailsEntity entity = new SalaryDataDetailsEntity();
			try{
				if(r.FieldCount>0){
					try
					{
						int ordinal = r.GetOrdinal("SalaryDataDetailId");
						if (!r.IsDBNull(ordinal)) entity.SalaryDataDetailId = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("SalaryFieldId");
						if (!r.IsDBNull(ordinal)) entity.SalaryFieldId = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DateInput");
						if (!r.IsDBNull(ordinal)) entity.DateInput = ((DateTime)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("Note");
						if (!r.IsDBNull(ordinal)) entity.Note = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("SalaryData");
						if (!r.IsDBNull(ordinal)) entity.SalaryData = (Convert.ToDecimal(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("UserId");
						if (!r.IsDBNull(ordinal)) entity.UserId = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("PersonId");
						if (!r.IsDBNull(ordinal)) entity.PersonId = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					return entity;
				}
			}catch{}
			return null;
		}
		#endregion
	}
	/*****************************************************************************************************/
	/**********************************END SalaryDataDetailsDAOBase*****************************************/
	/*****************************************************************************************************/
}

